package client;

import javax.swing.JTextArea;

public class Log {

	private static JTextArea out;

	public static void setOutput(JTextArea os) {
		out = os;
	}

	public static void println(String text) {
		if (out != null) {
			out.append("\n" + text);
			out.setCaretPosition(out.getDocument().getLength() - 1);
		}
	}

	public static void print(String text) {
		if (out != null) {
			out.append(text);
			out.setCaretPosition(out.getDocument().getLength() - 1);
		}
	}

}
